package com.linkme2night.tests;

import com.linkme2night.model.VenueDAO;

import junit.framework.Assert;
import android.test.AndroidTestCase;


public class VenueDAOtest extends AndroidTestCase {

	VenueDAO venue_dao = new VenueDAO();
	
    public void testGetCoordinates() throws Throwable 
    {
       Assert.assertEquals(51.110334, venue_dao.getLatitude(1));
       Assert.assertEquals(17.033451, venue_dao.getLongitude(1));
       Assert.assertEquals(51.110018, venue_dao.getLatitude(2));
       Assert.assertEquals(17.033342, venue_dao.getLongitude(2));
       Assert.assertEquals(51.109925, venue_dao.getLatitude(3));
       Assert.assertEquals(17.025385, venue_dao.getLongitude(3));
    }

    public void testGetName() throws Throwable 
    {
       Assert.assertEquals("Domówka", venue_dao.getName(1));
       Assert.assertEquals("Daytona", venue_dao.getName(2));
       Assert.assertEquals("Mundo 71", venue_dao.getName(3));
    }
    
    public void testGetAddress() throws Throwable
    {
    	Assert.assertEquals("Rynek 39, 50-102 Wrocław", venue_dao.getAddress(1));
        Assert.assertEquals("Rynek 35 and 36/37, 50-102 Wroclaw", venue_dao.getAddress(2));
        Assert.assertEquals("Ruska 51, 50-079 Wroclaw", venue_dao.getAddress(3));
    }
    
    public void testWorkingHours() throws Throwable
    {
    	Assert.assertEquals("21:00", venue_dao.getOpeningHours(1)); 
    	Assert.assertEquals("05:00", venue_dao.getClosingHours(1)); 
    	Assert.assertEquals("20:00", venue_dao.getOpeningHours(2)); 
    	Assert.assertEquals("07:00", venue_dao.getClosingHours(2)); 
    	Assert.assertEquals("20:00", venue_dao.getOpeningHours(3)); 
    	Assert.assertEquals("06:00", venue_dao.getClosingHours(3)); 
    }
}